package cn.wolfcode.car.business.domain;

import cn.wolfcode.car.base.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter
@Getter
public class StockBill {
    public static final Integer STOCK_IN = 0;    // 0 入库
    public static final Integer STOCK_OUT = 1;  // 1 出库
    public static final Integer STOCK_BILL_NORMAL = 0;//库单状态, 0 正常
    public static final Integer STOCK_BILL_CANCEL = 1;//库单状态, 1 作废

    /** 单据流水号*/
    private Long id;

    /** 类型, 0 入库, 1 出库*/
    private Integer type;

    /** 仓库id*/
    private Store store;
    private Long storeId;

    /** 出入库时间*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date busiDate;

    /** 0 正常, 1 作废*/
    private Integer status = STOCK_BILL_NORMAL;

    /** 操作时间*/
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date operateDate;

    /** 操作人*/
    private User user;
    private Long operatorId;

    /** 备注*/
    private String remark;

}